package cn.xingzhen.jfield.ui;

import java.io.Serializable;

/**
 * @author yuwan [2023-03-17 14:23]
 * @since
 */
public class FieldAttr implements Serializable {
    private static final long serialVersionUID = -5488737444400774127L;

    private String name; // 字段名称
    private String comment; // 字段备注
    private String type;// 字段类型
    private Integer maxLength; // 最大长度
    private int precision; // 精度
    private boolean isNullable; // 是否为空

    public String getName() {
        return name;
    }

    public FieldAttr setName(String name) {
        this.name = name;
        return this;
    }

    public String getComment() {
        return comment;
    }

    public FieldAttr setComment(String comment) {
        this.comment = comment;
        return this;
    }

    public String getType() {
        return type;
    }

    public FieldAttr setType(String type) {
        this.type = type;
        return this;
    }

    public Integer getMaxLength() {
        return maxLength;
    }

    public FieldAttr setMaxLength(Integer maxLength) {
        this.maxLength = maxLength;
        return this;
    }

    public int getPrecision() {
        return precision;
    }

    public FieldAttr setPrecision(int precision) {
        this.precision = precision;
        return this;
    }

    public boolean isNullable() {
        return isNullable;
    }

    public FieldAttr setNullable(boolean nullable) {
        isNullable = nullable;
        return this;
    }
}
